function mytest(reg){
    return function(str){
        return reg.test(str)
    }
}


const testName = mytest(/^[a-zA-Z_]\w{4,15}$/);
const testPass = mytest(/^\w{6,30}$/);

